<template>
    <div>
        <el-col :md="24" class="text-right mb20">
          <router-link :to="'/carrier_interface_sets/' + $route.params.id + '/new'">
            <el-button type="primary">新增</el-button>
          </router-link>
        </el-col>
        <el-table :data="tableData" stripe border style="width: 100%">
            <el-table-column prop="name" label="接口名称">
            </el-table-column>
            <el-table-column prop="type" label="接口种类" width="80">
            </el-table-column>
            <el-table-column prop="update_api" label="更新外部数据接口" width="140">
            </el-table-column>
            <el-table-column prop="diaoyongqian" label="调用前更新数据" width="130">
            </el-table-column>
            <el-table-column prop="diaoyonghou" label="调用后更新数据" width="130">
            </el-table-column>
            <el-table-column prop="baojun" label="报竣验证" width="80">
            </el-table-column>
            <el-table-column prop="chaxun" label="查询验证" width="80">
            </el-table-column>
            <el-table-column prop="yanzheng" label="查询验证接口" width="110">
            </el-table-column>
            <el-table-column prop="methods" label="操作" width="80">
                <template slot-scope="scope">
                    <el-button size="mini" type="danger" @click="deleteSingData(scope.row)">删除</el-button>
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                tableData: [
                    {
                        id: 1,
                        type: '查询类',
                        update_api: 'Y',
                        diaoyongqian: 'Y',
                        diaoyonghou: 'Y',
                        baojun: 'Y',
                        chaxun: 'Y',
                        yanzheng: 'Y'
                    }
                ]
            }
        },
        methods: {
            editSingData() {
                this.$router.push({
                    path: '/carrier_interface_sets/edit'
                })
            },
            getDetail(goods) {
                this.$router.push({
                    path: `/carrier_interface_sets/${goods.id}`
                })
            }
        }
    }
</script>

<style scoped lang="scss">
    .text-right {
        text-align: right;
    }
</style>